<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditUserProfileTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditUserProfileLabel_profileId}" for="profileId" />
                    <h:inputText id="profileId" value="#{userProfileController.selected.profileId}" title="#{bundle.EditUserProfileTitle_profileId}" />
                    <h:outputLabel value="#{bundle.EditUserProfileLabel_userId}" for="userId" />
                    <h:inputText id="userId" value="#{userProfileController.selected.userId}" title="#{bundle.EditUserProfileTitle_userId}" />
                    <h:outputLabel value="#{bundle.EditUserProfileLabel_fullname}" for="fullname" />
                    <h:inputText id="fullname" value="#{userProfileController.selected.fullname}" title="#{bundle.EditUserProfileTitle_fullname}" />
                    <h:outputLabel value="#{bundle.EditUserProfileLabel_garden}" for="garden" />
                    <h:inputText id="garden" value="#{userProfileController.selected.garden}" title="#{bundle.EditUserProfileTitle_garden}" />
                    <h:outputLabel value="#{bundle.EditUserProfileLabel_birthday}" for="birthday" />
                    <h:inputText id="birthday" value="#{userProfileController.selected.birthday}" title="#{bundle.EditUserProfileTitle_birthday}" />
                    <h:outputLabel value="#{bundle.EditUserProfileLabel_phoneNumber}" for="phoneNumber" />
                    <h:inputText id="phoneNumber" value="#{userProfileController.selected.phoneNumber}" title="#{bundle.EditUserProfileTitle_phoneNumber}" />
                </h:panelGrid>
                <h:commandLink action="#{userProfileController.update}" value="#{bundle.EditUserProfileSaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditUserProfileViewLink}"/>
                <br />
                <h:commandLink action="#{userProfileController.prepareList}" value="#{bundle.EditUserProfileShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.EditUserProfileIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
